

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	<!-- saved from url=(0022)http://www.ncover.com/ -->
    <title>NCover Code Coverage Report - New Project</title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-us" />
	<link rel="stylesheet" type="text/css" href="../default.css" />
	
	<script type="text/javascript" src="../sorttable.js"></script>
    <script type="text/javascript" src="../prototype.js"></script>
    <!--[if IE]>
		<script type="text/javascript" src="../excanvas.js"></script>
	<![endif]-->
    <script type="text/javascript" src="../blech.js"></script>
    <script type="text/javascript" src="../ncover.js"></script>
  </head>
  <body>
    <div id="hdrbar">
      <div id="hdrbar_left">
        <a href="../coveragesummary.html" target="doc">New Project</a>
      </div>
    </div>
    <div id="content">
      

<div id="page_title">
  <em>Code Coverage Statistics for Source File</em>
  <h1>BookFinder.Tests\ValuePropertyBinder.cs</h1>
</div>



<div id="page_stats">
	<div id="left">
		<p>Symbol Coverage: <span class="highlight uncovered">94.12%</span> (16 of 17)</p><p>Branch Coverage: <span class="highlight acceptable">88.89%</span> (8 of 9)</p><p>Cyclomatic Complexity Avg: <span class="highlight">2.67</span> Max:<span class="highlight acceptable">4</span> </p>

<p>
  Code Lines:
  <span class="highlight">12</span>
</p>
	</div>
	
</div>
<br style="clear: both;" />




<table id="sourceTable" class="source">
  <tr>
  <th class="linenum" title="Line #">L</th>
  <th class="linenum" title="Visit Count">V</th>
  <th class="sourceline" style="text-align: left;">Source</th>
  </tr>


  <tr>
  
     <td>
  
    <pre><a name="L1">1</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>using System;</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L2">2</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>using System.Reflection;</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L3">3</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>using System.Collections;</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L4">4</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L5">5</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>namespace BookFinder.Tests</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L6">6</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>{</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L7">7</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>   public class ValuePropertyBinder</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L8">8</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>   {</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L9">9</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>         public static void Bind(ViewModelBase viewModel)</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L10">10</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>         {</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L11">11</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 2 times"> 2</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>             foreach ( <span class="covered">FieldInfo field in viewModel.PropertyFields() </span>)</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L12">12</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>             {</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L13">13</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 10 times"> 10</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>                 <span class="covered">ValuePropertyStrategy propertyStorageStrategy = new ValuePropertyStrategy(MakeStartingValue(field.FieldType));</span></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L14">14</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre></pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L15">15</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 10 times"> 10</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>                 <span class="covered">ConstructorInfo propertyConstructor = field.FieldType.GetConstructor(new Type[] {typeof (PropertyStorageStrategy)});</span></pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L16">16</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 10 times"> 10</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>                 <span class="covered">object propertyField = propertyConstructor.Invoke(new object[] {propertyStorageStrategy});</span></pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L17">17</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 10 times"> 10</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>                 <span class="covered">field.SetValue(viewModel, propertyField);</span></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L18">18</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>             }</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L19">19</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 2 times"> 2</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>         <span class="covered">}</span></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L20">20</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L21">21</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>         private static object MakeStartingValue(Type fieldType)</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L22">22</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>         {</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L23">23</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 10 times"> 10</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>            <span class="covered">Type propertyType = fieldType.GetProperty(&quot;Value&quot;).PropertyType;</span></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L24">24</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>            </pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L25">25</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 4 times"> 4</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>            <span class="covered">if ( propertyType == typeof(IList) ) </span>{ <span class="covered">return new ArrayList(); </span>}</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L26">26</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 4 times"> 4</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>            <span class="covered">if ( propertyType == typeof(string) ) </span>{ <span class="covered">return &quot;&quot;; </span>}</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L27">27</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 2 times"> 2</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>            <span class="covered">if ( propertyType == typeof(bool) ) </span>{ <span class="covered">return false; </span>}</pre>
  </td>
</tr>


  <tr>
  
    <td class="uncoveredLine">
  
    <pre><a name="L28">28</a></pre>
  </td>
  
  
    <td class="uncoveredLine">
  
	  <pre title="Visited 0 times"> 0</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>            else { <span class="uncovered">return null; </span>}</pre>
  </td>
</tr>


  <tr>
  
    <td class="coveredLine">
  
    <pre><a name="L29">29</a></pre>
  </td>
  
  
    <td class="coveredLine">
  
	  <pre title="Visited 10 times"> 10</pre>
    
  </td>
  
  <td class="sourceline">
    <pre>         <span class="covered">}</span></pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L30">30</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>   }</pre>
  </td>
</tr>


  <tr>
  
     <td>
  
    <pre><a name="L31">31</a></pre>
  </td>
  
  
		<td>
  
  </td>
  
  <td class="sourceline">
    <pre>}</pre>
  </td>
</tr>



</table>

<script type="text\\javascript" language="javascript">
document.getElementById('coveredCheck').checked = false;
</script>
    </div>
    <div id="footer">
	  Generated By  
      <a href="http://www.ncover.com" target="_top">NCover</a><br />
    </div>
  </body>
</html>